home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Hyper / H / HyperExtras.sit / HyperExtras / HyperExtras.rsrc / TEXT_3000_examinSCTEXT.txt < prev    next >
Encoding:
Text File  |  1994-03-23  |  2.9 KB  |  91 lines

  1. global haveScript
  2.   if which is "objects" then put empty into haveScript
  3.   global allScripts
  4.   if which is "extract" then put empty into allScripts
  5.   if which is "handleCount" then
  6.     getHandleCount
  7.     returnPal palBtnNum
  8.   end if
  9.   if which is "variableP" then
  10.     set visible of window "Variable Watcher" to not visible of window "Variable Watcher"
  11.     returnPal palBtnNum
  12.   end if
  13.   if which is "messageP" then
  14.     set visible of window "Message Watcher" to not visible of window "Message Watcher"
  15.     returnPal palBtnNum
  16.   end if
  17.   global ScriptFindString -- HyperTalk global variable
  18.   set lockRecent to true
  19.   setUserLevelFive
  20.   push card
  21.   
  22.   if which is "search" then
  23.     ask "Search for what string?" with ScriptFindString
  24.     if (it is empty) or (the result is "Cancel") then exit to hypercard
  25.     put it into pattern
  26.   end if
  27.   
  28.   put pattern into ScriptFindString
  29.   set lockMessages to true
  30.   set cursor to busy
  31.   lock screen
  32.   put name of this stack into x
  33.   chooseScript x, which, pattern
  34.   repeat with curBkgnd = 1 to the number of bkgnds
  35.     if the shiftKey is down then exit to hypercard
  36.     set cursor to busy
  37.     go to card 1 of bkgnd curBkgnd
  38.     put name of this bg into x
  39.     chooseScript x, which, pattern
  40.     if number of bg btns >=1 then
  41.       repeat with curBgBtn = 1 to the number of bkgnd buttons
  42.         if the shiftKey is down then exit to hypercard
  43.         set cursor to busy
  44.         put "bg btn "&curBgBtn into x
  45.         chooseScript x, which, pattern
  46.       end repeat
  47.     end if
  48.     if number of bg flds >=1 then
  49.       repeat with curBgField = 1 to the number of bkgnd fields
  50.         if the shiftKey is down then exit to hypercard
  51.         set cursor to busy
  52.         put "bg fld "&curBgField into x
  53.         chooseScript x, which, pattern
  54.       end repeat
  55.     end if
  56.   end repeat
  57.   repeat with curCard = 1 to the number of cards
  58.     if the shiftKey is down then exit to hypercard
  59.     set cursor to busy
  60.     go card curCard
  61.     put "card "&curCard into x
  62.     chooseScript x, which, pattern
  63.     if number of cd btns >=1 then
  64.       repeat with curCdBtn = 1 to the number of card buttons
  65.         if the shiftKey is down then exit to hypercard
  66.         set cursor to busy
  67.         put "cd btn "&curCdBtn into x
  68.         chooseScript x, which, pattern
  69.       end repeat
  70.     end if
  71.     if number of cd flds >=1 then
  72.       repeat with curCdFld = 1 to the number of card fields
  73.         if the shiftKey is down then exit to hypercard
  74.         set cursor to busy
  75.         put "cd fld "&curCdFld into x
  76.         chooseScript x, which, pattern
  77.       end repeat
  78.     end if
  79.   end repeat
  80.   set lockMessages to false
  81.   set lockRecent to false
  82.   pop card -- return to where we were
  83.   restoreUserLevel -- set userLevel back to whatever it was
  84.   if which is "extract" then writeScript
  85.   global HEXInfo, haveScript
  86.   if which is "objects" then
  87.     put haveScript into HEXInfo
  88.     put "+++++ Objects with scripts +++++"&return before HEXInfo
  89.     put empty into haveScript
  90.   end if
  91.